using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for ManageReservedBook
/// </summary>
public class ManageReservedBook
{
    DatabaseAccess da = new DatabaseAccess();

    public void reserveBook(ReservedBook book) 
    {
        da.addReservedBook(book);
    }

    public void updateReservation(ReservedBook book)
    {
        da.updateReservedBook(book);
    }

    public void unreserveBook(String Barcode) { } //delete

    public ReservedBook getReservedBook(int reserveID)
    {
        return da.getReservedBook(reserveID);
    }
    public SqlDataAdapter getPatronBooks(int PersonID)
    {
        return da.getPatronReservedBooks(PersonID);
    }

    //for Librarian view reserved books
    //gets all new reserved books that need to be set aside
    //Jacquie
    public SqlDataAdapter GetReservedBooks_LibrarianView(int libraryId)
    {
        return da.GetReservedBooks_LibrarianView(libraryId);
    }

    //for Librarian view reserved books
    //updates status of reserved books to ready to pickup
    //Jacquie
    public int UpdateReservedBookStatus_LibrarianView(int reserveId, string status)
    {
        return da.UpdateReservedBookStatus_LibrarianView(reserveId, status);
    }

    //for Librarian view reserved books
    //gets all books ready for pickup
    //Jacquie
    public SqlDataAdapter GetReadyBooks_LibrarianView(int libraryId)
    {
        return da.GetReadyBooks_LibrarianView(libraryId);
    }

    public bool isBookReserved(String Barcode)
    {
        return false;
    }
}
